﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%

	dim rs,sql,i,name,act,page,fleg,zuan,namee,zf,browse,reply,txtt,lock,shuqian,xuzhan,content,attad,qingt

    		act = Request.QueryString("act")

    		Page = Request("page")      '当前页数
    		If Page = "" Then Page = 1
   		If Not IsNumeric(Page) Then Page = 1
    		Page = CLng(Page)
    		If Page < 1 Then Page = 1

		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=1
		if listid="" then listid=1
		listid=clng(listid)

		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)
                PageSize=700

	Set Rs = Server.CreateObject("Adodb.Recordset")
	Sql = "SELECT [name],[bbs]  FROM [qingtian_bbs] where [del]=0 and [view]=0 and [id]="&listid
	Rs.Open Sql,conn,1,1
	if not (rs.bof and rs.eof)  then
		namee=qingtian.utf8(rs("name"))
		bbs=rs("bbs")
        else 
        qingt=true
	end if
	Rs.close

	if act="" then act=1

select case v
case "0"
we0="<br/>"
we5="<br/>"
hr="----------<br/>"
book="文明上网,理性发言<br/><input name=""remark"" type=""text"" maxlength=""128"" size=""15"" emptyok=""true"" value="""" /><br/><select title='表情' name='face' value='0'><option title='表情' value='0'>表情</option><option title='微笑' value='1'>微笑</option><option title='哭泣' value='2'>哭泣</option><option title='调皮' value='3'>调皮</option><option title='脸红' value='4'>脸红</option><option title='害羞' value='5'>害羞</option><option title='生气' value='6'>生气</option><option title='偷笑' value='7'>偷笑</option><option title='流汗' value='8'>流汗</option><option title='我倒' value='9'>我倒</option><option title='得意' value='10'>得意</option><option title='奸笑' value='11'>奸笑</option><option title='疑问' value='12'>疑问</option><option title='睡觉' value='13'>睡觉</option><option title='好色' value='14'>好色</option><option title='口水' value='15'>口水</option><option title='敲头' value='16'>敲头</option><option title='惊讶' value='17'>惊讶</option><option title='撇嘴' value='18'>撇嘴</option><option title='难过' value='19'>难过</option><option title='玫瑰' value='20'>玫瑰</option></select><anchor title=""发表回复"">发表回复<go href='showcont.asp?Action=save&amp;id="&id&"&amp;listid=" & listid & "&amp;pageid=" & pageid & "&amp;sid="&sidd&"' method='post'><postfield name=""content"" value=""$(remark)""/><postfield name=""face"" value=""$(face)""/></go></anchor><br/>"
title="<card title=""查看帖子""><p align="""&qingtian.px&""">"
case "1"
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
we4="</div>"
we5="</div>"
da01="<div class=""footer"">"
PageSize=1000
ziz="<div style=""background-color:#FF5226;color:#E1E100; margin: auto; text-align:left;"">"
book="<form action=""showcont.asp?Action=save&amp;id="&id&"&amp;listid=" & listid & "&amp;pageid=" & pageid & "&amp;sid="&sidd&""" method=""post""><div style=""background-color:#006000;color:#E1E100"">文明上网,理性发言</div><input type=""text"" size=""15"" name=""content"" value="""" /><br/><select title='表情' name='face' value='0'><option title='表情' value='0'>表情</option><option title='微笑' value='1'>微笑</option><option title='哭泣' value='2'>哭泣</option><option title='调皮' value='3'>调皮</option><option title='脸红' value='4'>脸红</option><option title='害羞' value='5'>害羞</option><option title='生气' value='6'>生气</option><option title='偷笑' value='7'>偷笑</option><option title='流汗' value='8'>流汗</option><option title='我倒' value='9'>我倒</option><option title='得意' value='10'>得意</option><option title='奸笑' value='11'>奸笑</option><option title='疑问' value='12'>疑问</option><option title='睡觉' value='13'>睡觉</option><option title='好色' value='14'>好色</option><option title='口水' value='15'>口水</option><option title='敲头' value='16'>敲头</option><option title='惊讶' value='17'>惊讶</option><option title='撇嘴' value='18'>撇嘴</option><option title='难过' value='19'>难过</option><option title='玫瑰' value='20'>玫瑰</option></select><input type=""submit"" value=""发表回复"" /></form><br/>"
title="<title>查看帖子</title></head><body>"
End Select
if qingt=true then qingtian.err("该帖子所在论坛版块不存在")
	if bbs=true and qingtian.nbz=true then
		%><%=title%><%=we%>出错啦!本版为版主论坛,请确认你有版主权限!<%=we0%><%
	elseif qingtian.qx("nologin", listid)=true then
		%><%=title%><%=we%>出错啦!你已被禁止登陆本论坛,有任何问题请联系管理员!<%=we0%><%
	else		
	Sql = "select top 1 a.browse,a.name,a.content,a.upfile,a.time,a.edittime,a.bottom,a.browse,a.top,a.good,a.vip,a.zuan,a.zid,a.lock,a.reply,a.vote,a.votenum,a.votenid,a.votetype,a.member,a.nid,b.name,b.vip,b.xunzhan,b.mark,b.zf from [qingtian_bbs_forum] a ,[qingtian_user] b where a.nid=b.id and a.del=0 and a.id="&id
	Rs.Open Sql,conn,1,3
	if not (rs.bof and rs.eof)  then
                If RS("top") = True Then
                    PageSize=4500             
                End If
                If RS("zuan") = True Then
                    PageSize=1000             
                End If
                If RS("a.vip") = True Then
                    PageSize=1500            
                End If
		rs("browse")=rs("browse")+1
		rs.update
                zf=rs("zf")
                vipp=rs("b.vip")
if vipp=1 then
vip="<img src=""/img/vip.gif"" alt='VIP' noselect = ""true"" />"
else
vip=""
end if        
		browse=rs("browse")
		reply=rs("reply")
		name=rs("a.name")
		txtt=rs("content")
		lock=rs("lock")
                shuqian=qingtian.ubb2(rs("mark"))
                xuzhan=rs("xunzhan")
                content=txtt
                content=qingtian.ubbwml1(content,listid,id,rs("nid"))
if v=0 then 
title="<card title="""&qingtian.utf8(name)&"""><p align="""&qingtian.px&""">"
else
title="<title>"&qingtian.utf8(name)&"</title></head><body>"
end if
	''''''''''''''''''智能分页''''''''''''''''''''''
	if Request.QueryString("act")<>1 then
        Dim  n
        I = 1
        Do
            n = n + 1
            If n = page Then
                PageIn = I
            End If
            If InStr(I, content, "[page]") - I < PageSize + PageSize / 4 * 3 And InStr(I, content, "[page]") <> 0 Then
                I = InStr(I, content, "[page]") + 6
            Else
                I = I + PageSize
            End If
            If n = page Then
                PageOut = I
            End If

        Loop While I < Len(content)
        PageCount = n

	if Pagein="" then Pagein=(PageCount-1)*PageSize+1
	if Pageout="" then Pageout=Len(content)-(PageCount-1)*PageSize+Pagein

	content=replace(mid(content,Pagein,Pageout-Pagein),"[page]","")
		else
			PageCount=1
			page=1
		end if
		if sid="Null" then
		%><%=title%><%=sou%><%=zi%>欢迎你<%=zi0%><a href="/login.asp?sid=<%=sidd%>&amp;url=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>">注册/登陆</a><%=we0%><%
		else
		%><%=title%>
<%
qingtian.info
qingtian.addong("阅读了帖子[url=/bbs/viewv.asp?id="&id&"&listid="&listid&"&pageid=" & pageid & "&sid=[sid]]"&name&"[/url]")
		end if
%>
<%=qingtian.qingsav("62")%>
<%=dao%>
<a href='index.asp?sid=<%=sidd%>'>论坛</a>&gt;<a href='board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>'><%=namee%></a>&gt;贴子
<%=we0%>
<%=da01%>
<%
                If RS("top") = True Then
                    Response.Write (""&zi&"<b>[顶]</b>"&zi0&"")              
                End If
                If RS("a.vip") = True Then
                if qingtian.vip(qingtian.nid)<>"VIP会员" and qingtian.bz(listid)=false then qingtian.err("你不是VIP会员,没权浏览该帖子!"&we4&"")
                    Response.Write (""&zi&"<b>[vip]</b>"&zi0&"")               
                End If
                If RS("good") = True Then
                    Response.Write (""&zi&"<b>[精]</b>"&zi0&"")
                End If
                If RS("zuan") = True Then
                    Response.Write (""&zi&"<b>[专]</b>"&zi0&"")
			Set zuan_rs = Server.CreateObject("Adodb.Recordset")
			Sql1 = "select [name] from [qingtian_zuan]  where id="&rs("zid")&" order by [id] asc"
			zuan_rs.Open Sql1,conn,1,1
	                if not (zuan_rs.bof and zuan_rs.eof) then
                        zuan=""&hr&""&we&"专题:<a href='zuanli.asp?id="&rs("zid")&"&amp;sid="&sidd&"'>"&qingtian.utf8(zuan_rs("name"))&"</a>"&we0&""
                        else
                        zuan=""
                        end if 
                        zuan_rs.close
                        set zuan_rs=nothing
                End If
                If RS("vote") <> "" Then
                    Response.Write (""&zi&"<b>[投]</b>"&zi0&"")
                End If
                If RS("bottom") = True Then
                    Response.Write (""&zi&"<b>[底]</b>"&zi0&"")
                End If
                If RS("upfile") = True Then
                    Response.Write (""&zi&"<b>[附]</b>"&zi0&"")
                End If
                If RS("lock") = True and qingtian.bz(listid)=false Then
                    Response.Write (""&zi&"<b>[锁]</b>"&zi0&"")
%>
<b><%=qingtian.ubb2(name)%></b>(阅<%=browse%>)<%=we5%><%=sou%>楼主:<%=vip%><a href="/user/spacev.Asp?urls=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>&amp;nid=<%=rs("nid")%>&amp;sid=<%=sidd%>"><%=qingtian.utf8(rs("b.name"))%>(<%=qingtian.jibie(zf)%>)</a>(ID:<%=rs("nid")%>)<a href="/user/liaoinfo.Asp?urls=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>&amp;id=<%=rs("nid")%>&amp;sid=<%=sidd%>">对话/<%=qingtian.onlina(rs("nid"))%></a>
<% if xuzhan<>"" then %><%=xuzhan%><%end if%><br/>
时间:<%=rs("time")%><%=we0%><%=hr%><%=we%>
该贴已经锁定<%=we0%>
<%else
if (PageCount >1 or Request.QueryString("act")=1) and page<2 then
if Request.QueryString("act")=1 then
boody="[url=viewv.asp?pageid=" & pageid & "&id="&id&"&listid="&listid&"&page=" & Page& "&sid="&sidd&"]分页查看共("&len(txtt)&")字[/url][br]"
else
boody="[url=viewv.asp?act=1&pageid=" & pageid & "&id="&id&"&listid="&listid&"&page=" & Page& "&sid="&sidd&"]查看全部共("&PageCount&")页[/url][br]"
end if
end if
content=boody&content
%>
<b><%=qingtian.ubb2(name)%></b>(阅<%=browse%>)<%=we0%><%=sou%>楼主:<%=vip%><a href="/user/spacev.Asp?urls=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>&amp;nid=<%=rs("nid")%>&amp;sid=<%=sidd%>"><%=qingtian.utf8(rs("b.name"))%>(<%=qingtian.jibie(zf)%>)</a>(ID:<%=rs("nid")%>)<a href="/user/liaoinfo.Asp?urls=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>&amp;id=<%=rs("nid")%>&amp;sid=<%=sidd%>">对话/<%=qingtian.onlina(rs("nid"))%></a>
<% if xuzhan<>"" then %><%=xuzhan%><%end if%><br/>
时间:<%=rs("time")%><%=we0%><%=hr%><%=we%>
<%=qingtian.ubbwml(content)%><br/>
<%
		'''''''''''''''''''投票''''''''''''''''''''''
		if rs("vote")<>"" then
		dim vote,votenum,vote_1,vote_2
			vote=split(rs("vote"),"|")
			votenum=split(rs("votenum"),"|")
                        if v=0 then
            		vote_2="<select name='voteid'  value='0'>"
            		For i = 0 to ubound(vote)
                		If vote(i) <> "" Then
                   	 		vote_2=vote_2 & "<option value='" & i & "'>" & vote(i) & "</option>"
					vote_1=vote_1 & i+1 &". " & qingtian.utf8(vote(i)) &"|票数:"&votenum(i) &"<br/>"
                		End If
            		Next
            		vote_2=vote_2 & "</select><br/>"
            		vote_2=vote_2 & "<anchor>投Ta一票"
            		vote_2=vote_2 & "<go href='vo.asp?id=" & id & "&amp;listid=" & listid & "&amp;pageid=" & pageid & "&amp;sid="&sidd&"' method='post'>"
            		vote_2=vote_2 & "<postfield name='voteid' value='$(voteid)' />"
            		vote_2=vote_2 & "</go></anchor><br/>"
                        else
            		vote_2="<form action='vo.asp?id=" & id & "&amp;listid=" & listid & "&amp;pageid=" & pageid & "&amp;sid="&sidd&"' method='post'><select name='voteid'  value='0'>"
            		For i = 0 to ubound(vote)
                		If vote(i) <> "" Then
                   	 		vote_2=vote_2 & "<option value='" & i & "'>" & vote(i) & "</option>"
					vote_1=vote_1 & i+1 &". " & qingtian.utf8(vote(i)) &"|票数:"&votenum(i) &"<br/>"
                		End If
            		Next
            		vote_2=vote_2 & "</select>"
            		vote_2=vote_2 & "<input type='submit' value='投Ta一票'/></form>"
                        End If
			%><%=hr%><%=we4%><%=ziz%>★☆以下为投票内容☆★<%=we0%><%=we%><%
			%><%=vote_1%><%=we0%><%=we%><%
			if sid<>"Null" then
				if rs("votetype")=true then
					%><%=vote_2%><%
				else
					dim nid,votenid,rs2,sql2,votenid2
					Set Rs2 = Server.CreateObject("Adodb.Recordset")
					Sql2 = "select [id] FROM qingtian_user where [sid]='"&sid&"'"
					Rs2.Open Sql2,conn,1,1
					if not (rs2.eof and rs2.bof) then
						nid=rs2("id")
					else
						nid=0
					end if
					Rs2.close
					set rs2=nothing


					votenid2=false

					if rs("votenid")<>"" then
					votenid=split(rs("votenid"),"|")
            				For i = 0 to ubound(votenid)
						if votenid(i)<>"" then
               					If clng(votenid(i)) = nid Then
							votenid2=true
							exit for
                				End If
						end if
            				Next
					end if

					if votenid2=false then
					%><%=vote_2%><%
					end if
				end if
			end if
		end if


		'''''''''''''''''''附件'''''''''''''''''''''''
		if rs("upfile")=true then

%><%=hr%><%if sid="Null" then
Response.Write("此资源需<a href='/login.asp?sid="&sidd&"&amp;url=/bbs/board.asp?listid=" & listid & "'>登录</a>查看<br/>")
else
Response.Write(""&we4&""&ziz&"★☆以下为附件☆★"&we0&""&we&"")
			Set file_rs = Server.CreateObject("Adodb.Recordset")
			Sql = "select [id],[name],[url],[size],[time],[nid] from [qingtian_bbs_forum_file]  where topicid="&id&" order by [id] asc"
			file_rs.Open Sql,conn,1,1
			if not (file_rs.bof and file_rs.eof)  then
		For i=1 to file_rs.RecordCount
			If file_rs.Eof Then
				exit For
			End If
			FileExp=Right(qingtian.utf8(file_rs("url")),Len(qingtian.utf8(file_rs("url")))-InstrRev(qingtian.utf8(file_rs("url")),"."))
                        FileExpe=Right(qingtian.utf8(file_rs("url")),Len(qingtian.utf8(file_rs("url")))-InstrRev(qingtian.utf8(file_rs("url")),"/"))
			if lcase(FileExp)="gif" or lcase(FileExp)="jpg" or lcase(FileExp)="bmp" or lcase(FileExp)="png" then
				%><img src="<%=qingtian.utf8(file_rs("url"))%>" alt='附件' noselect = "true" /><br/><%
			end if
		%><%=i%>.<%
			if len(file_rs("name"))>0 then%><a href="downfile.asp?listid=<%=listid%>&amp;id=<%=id%>&amp;tid=<%=file_rs("id")%>&amp;sid=<%=sidd%>">下载<%=qingtian.utf8(file_rs("name"))%></a>(大小:<%=int(file_rs("size")/1000000)+1%>kb)<%else%><a href="downfile.asp?listid=<%=listid%>&amp;id=<%=id%>&amp;tid=<%=file_rs("id")%>&amp;sid=<%=sidd%>">下载<%=qingtian.utf8(FileExpe)%></a>(大小:<%=int(file_rs("size")/1000000)+1%>kb)<%end if%><br/><%
		file_rs.MoveNext
		Next
			end if
			file_rs.close
			set file_rs=nothing
end if
		end if
%><%=we4%><%    	
    		'分页
    		If Page < PageCount Then
    		    boddyy="<a href='viewv.asp?id="&id&"&amp;listid="&listid&"&amp;pageid=" & pageid & "&amp;page=" & Page + 1 & "&amp;sid="&sidd&"'>下一页.</a>"
    		End If
    		If Page > 1 Then
    		    boddyy=boddyy&"<a href='viewv.asp?id="&id&"&amp;listid="&listid&"&amp;pageid=" & pageid & "&amp;page=" & Page - 1 & "&amp;sid="&sidd&"'>上一页.</a>"
    		End If
                if PageCount >1 then
     		    boddyy=boddyy&"(" & Page & "/" & PageCount & ")"
                    boddyy=dao&boddyy&we0
    		End If
End If
    		%>
<%=boddyy%><%=hr%><%=sou%><%=zi%>签名:<%=zi0%><%=shuqian%><%=we0%><%=zuan%>
<%=dao%><a href='downtxt.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;sid=<%=sidd%>'>下载.</a><a href="fatie.asp?listid=<%=listid%>&amp;sid=<%=sidd%>">发帖.</a><a href="showcont.asp?id=<%=id%>&amp;pageid=<%=pageid%>&amp;listid=<%=listid%>&amp;sid=<%=sidd%>">回复.</a><a href="souzan.asp?sid=<%=sidd%>&amp;name=<%=server.URLEncode(rs("a.name"))%>&amp;urls=/bbs/viewv.asp?id=<%=id%>@@listid=<%=listid%>@@pageid=<%=pageid%>">收藏.</a><%=we0%><%=qingtian.qingsav("6388888")%>
<%


			if  qingtian.bz(listid) then
%>
				<%=sou%>
					<a href="banji.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">编辑</a>.
                    			<a href="banji.asp?act=xue&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">续写</a>.
					<a href="upa.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">上传附件</a><br/>
                                        <a href="guan.asp?Action=zuan&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">加专</a>.                   
                                        <a href="guan.asp?Action=jh&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">加精</a>.
					<a href="guan.asp?Action=jt&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">置顶</a>.
					<a href="guan.asp?Action=jc&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">锁定</a><br/>
					<a href="guan.asp?Action=cc&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">置底</a>.
					<a href="guan.asp?Action=tc&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">提升</a>.
					<a href="guan.asp?Action=del&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">删除</a>.
					<a href="guan.asp?Action=xjh&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">去精</a><br/>
					<a href="guan.asp?Action=xjt&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">取顶</a>.
					<a href="guan.asp?Action=xjc&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">解锁</a>.
					<a href="guan.asp?Action=zh&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">取底</a>.
					<a href="guan.asp?Action=move&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">转移</a><br/>
					<a href="guan.asp?Action=vip&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">加vip</a>.
					<a href="guan.asp?Action=xvip&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">取vip</a><%=we0%>
			<%elseif rs("nid")=qingtian.nid  then%>
<%=sou%><a href="banji.asp?Action=edit&amp;type=board&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">编辑</a>.<a href="banji.asp?act=xue&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">续写</a>.<a href="upa.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">上传附件</a><%=we0%>
<%
			end if
else
         Response.Write title
qingtian.err("该帖不存在或以被删除<a href='board.asp?listid=" & listid & "&amp;page=" & pageid & "&amp;sid="&sidd&"'>返回"&namee&"</a>")
 	end if
	Rs.close
%>
<%=ziz%>★☆最新回复☆★<%=we0%>
<%
		Sql = "select a.id,a.content,a.time,a.nid,a.upfile,a.top,b.name,b.vip from [qingtian_bbs_reforum] a,[qingtian_user] b where a.nid=b.id and a.del=0 and  a.topicid="&id&" order by a.top asc,a.id desc"

		Rs.Open Sql,conn,1,1
		if not (rs.bof and rs.eof)  then
                attad=0
		For i=1 to rs.RecordCount
			If attad=3 Then
				exit For
			End If
         Response.Write we
dim dat
dat=reply+1-i
                If RS("top") = True Then
                    Response.Write (""&zi&"<b>[顶]</b>"&zi0&"")
                ELSE
                attad=attad+1
                    Response.Write (""&zi&"["&dat&"楼]."&zi0&"")                    
                End If

%>
<%=qingtian.ubb(rs("content"))%>
<%

		if rs("upfile")=true then
if sid="Null" then
Response.Write("<br/>此资源需<a href='/login.asp?sid="&sidd&"&amp;url=/bbs/board.asp?listid=" & listid & "'>登录</a>查看<br/>")
else
Response.Write("<br/>")
			Set file_rs = Server.CreateObject("Adodb.Recordset")
			Sql = "select top 1 [id],[name],[url],[size],[time],[nid] from [qingtian_bbs_reforum_file] a  where topicid="&id&" and reid="&rs("id")&" order by [id] desc"
			file_rs.Open Sql,conn,1,1
			if not (file_rs.bof and file_rs.eof)  then
			FileExp=Right(qingtian.utf8(file_rs("url")),Len(qingtian.utf8(file_rs("url")))-InstrRev(qingtian.utf8(file_rs("url")),"."))
                        FileExpe=Right(qingtian.utf8(file_rs("url")),Len(qingtian.utf8(file_rs("url")))-InstrRev(qingtian.utf8(file_rs("url")),"/"))
			if lcase(FileExp)="gif" or lcase(FileExp)="jpg" or lcase(FileExp)="bmp" or lcase(FileExp)="png" then
				%>
            <img src="<%=qingtian.utf8(file_rs("url"))%>" alt='附件' noselect = "true" /><br/>
            <%
			end if
			%><a href="<%=qingtian.utf8(file_rs("url"))%>">下载<%=qingtian.utf8(file_rs("name"))%></a>(大小:<%=int(file_rs("size")/1000000)+1%>kb)<br/>
            <%
			end if
			file_rs.close
			set file_rs=nothing
end if
		end if
%>(<%=rs("time")%>)<%=we0%><%=sou%>作者:<a href="/user/spacev.Asp?urls=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>&amp;nid=<%=rs("nid")%>&amp;sid=<%=sidd%>">
<%
if rs("vip")=1 then
Response.Write "<img src=""/img/vip.gif"" alt='VIP' noselect = ""true"" />"
end if
%>
<%=qingtian.utf8(rs("name"))%>(ID:<%=rs("nid")%>)</a>.[<a href="/user/liaoinfo.Asp?urls=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>&amp;id=<%=rs("nid")%>&amp;sid=<%=sidd%>">对话</a>]<%=we0%><%
		Rs.MoveNext
		next
		%>
<%=dao%><a href="showboard.asp?infoid=<%=id%>&amp;pageid=<%=pageid%>&amp;listid=<%=listid%>&amp;sid=<%=sidd%>">查看网友回复(<%=reply%>条)</a><%=we0%><%=hr%>
<%
else
%>
<%=we%>本帖暂无回复,欢迎你的参与!<%=we0%><%=hr%>
<%
 	end if
	Rs.close
		set rs=nothing
if sid<>"Null" then
%><%=we%><a href="showcont.asp?Action=save&amp;t=1&amp;id=<%=id%>&amp;pageid=<%=pageid%>&amp;listid=<%=listid%>&amp;sid=<%=sidd%>">我顶</a>◆<a href="showcont.asp?Action=save&amp;t=2&amp;id=<%=id%>&amp;pageid=<%=pageid%>&amp;listid=<%=listid%>&amp;sid=<%=sidd%>">支持</a>◆<a href="showcont.asp?Action=save&amp;t=3&amp;id=<%=id%>&amp;pageid=<%=pageid%>&amp;listid=<%=listid%>&amp;sid=<%=sidd%>">反对</a><%=we0%>
<%=book%>
<% else %>
<%=sou%>若要回复请先<a href="/login.asp?sid=<%=sidd%>&amp;url=/bbs/viewv.asp?id=<%=id%>@@listid=<%=listid%>">登陆</a>或<a href="/reg.asp?sid=<%=sidd%>&amp;url=/bbs/viewv.asp?id=<%=id%>@@listid=<%=listid%>">注册</a>用户.<%=we0%>
<% end if %>
<%=qingtian.qingsav("63")%>
   <%
 	end if
                Response.Write("" & hr & "" & sou & "<a href='board.asp?listid=" & listid & "&amp;page=" & pageid & "&amp;sid="&sidd&"'>返回"&namee&"</a>" & we0 & "")
%>

<%
End Function
%>
